import Vue from 'vue'
import App from './App'
import Request from "./ext/http.js"
import utils from "./ext/utils.js"
import routeUtils from "./ext/routeUtils.js"
import share from "./ext/share.js"
import store from "./store/index.js"
import Login from "./sevice/login.js"
import Init from "@/sevice/Init.js"
// 全局的mixin
import globalMixin from '@/ext/mixin.js'
// 全局的filter
import '@/common/filter'
import uView from 'uview-ui'
//引入websocket文件
// import websockeUtil from "./ext/websocket.js"
// let websocket = new websockeUtil("wss://www.talentmatch.top/chat", 10)

// 注册全局组件
import backTopBtn from "./common/public/back-top-btn.vue";
import backToIndex from "./common/public/backToIndex.vue";
import publicConfirm from "./common/public/confirm.vue";
import publicException from "./common/public/exception.vue";
import loadMore from "./common/public/loadMore.vue";
import customToast from "./common/public/customToast.vue"
import mallCheckBox from "./common/public/mallCheckBox.vue"
import dialog from './common/public/dialog'

// h5特殊的组件
Vue.component("back-top-btn", backTopBtn);
Vue.component("back-to-index", backToIndex);
Vue.component("public-confirm", publicConfirm);
Vue.component("public-exception", publicException);
Vue.component("load-more", loadMore);
Vue.component("custom-toast", customToast)
Vue.component("m-check-box", mallCheckBox)
Vue.component('public-dialog', dialog)

// h5一些公共组件
Vue.prototype.$Init = new Init()
Vue.config.productionTip = false;
Vue.prototype.$request = Request.mgHttp
Vue.prototype.$utils = utils
Vue.prototype.$routeUtils = routeUtils
Vue.prototype.$Login = new Login()
Vue.prototype.$share = new share()
Vue.prototype.$bus = new Vue()
// Vue.prototype.$socket = websocket
Vue.use(uView)
Vue.mixin(globalMixin)
App.mpType = 'app'
App.store = store;

const app = new Vue({
  ...App
})
app.$mount()
